package com.redstar.HappyRefresh.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.redstar.HappyRefresh.json.SettingScoreJson;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sys_setting")
public class Setting implements Serializable { // 平台相关设定

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    // 序列化后的审核策略
    private String auditPolicy;

    // 热门视频热度限制
    private Double hotLimit;

    // 审核开关
    private Boolean auditOpen;

    // 资源放行ip
    private String allowIp;

    private Boolean auth;

    @TableField(exist = false)
    private SettingScoreJson settingScoreJson; // 审核策略
}

/*
    {
    "successScore":{"minPulp":"0.0","maxPulp":"0.3",
                    "minTerror":"0.0","maxTerror":"0.2",
                    "minPolitician":"0.0","maxPolitician":"0.2","
                    auditStatus":"0"},
    "manualScore":{"minPulp":"0.3","maxPulp":"0.7",
                    "minTerror":"0.2","maxTerror":"0.6",
                    "minPolitician":"0.2","maxPolitician":"0.5",
                    "auditStatus":"3"},
    "passScore":{"minPulp":"0.7","maxPulp":"1",
                 "minTerror":"0.6","maxTerror":"1",
                 "minPolitician":"0.5","maxPolitician":"1",
                 "auditStatus":"2"}
    }
*/
